package com.easy.dn.ui.usercenter.adapter;

import android.support.annotation.LayoutRes;
import android.support.annotation.Nullable;
import android.view.View;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import java.util.List;

import dn.easy.com.easyto.R;

/**
 * Created by 丁宁
 * on 2017/5/4.
 */

public class CountryListAdapter extends BaseQuickAdapter<String, BaseViewHolder> {

    public CountryListAdapter(@LayoutRes int layoutResId, @Nullable List<String> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(final BaseViewHolder helper, String item) {
        if ("1".equals(item)) {
            helper.setBackgroundRes(R.id.iv_add_content, R.drawable.add);
            helper.getView(R.id.iv_addImg).setVisibility(View.INVISIBLE);
        } else {
            helper.setBackgroundRes(R.id.iv_add_content, R.drawable.usercenter_vip);
            helper.getView(R.id.iv_addImg).setVisibility(View.VISIBLE);
        }
//        if ( mData.size() -1) {
//            helper.getView(R.id.iv_addImg).setVisibility(View.GONE);
//        }

    }
}
